package com.usian.article.controller;

import com.usian.apis.article.ApArticleConfigControllerApl;
import com.usian.apis.article.ApArticleControllerApl;
import com.usian.article.service.ApArticleConfigService;
import com.usian.article.service.ApArticleService;
import com.usian.model.article.pojos.ApArticle;
import com.usian.model.article.pojos.ApArticleConfig;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.common.enums.AppHttpCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/article")
public class ApArticleController implements ApArticleControllerApl {

    @Autowired
    private ApArticleService apArticleService;

    @Override
    public ApArticle saveArticle(ApArticle apArticle) {
        boolean save = apArticleService.save(apArticle);
        if (save){
            return apArticle;
        }
        return null;
    }
}
